<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--       
*     Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
*     Use is subject to license terms.
-->
<html>
<head>
<title>Setting the Main JavaFX Class and Runtime Arguments</title>
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
</head>
<body>
<h2>Setting the Main JavaFX Class and Runtime Arguments</h2>
<p><small><a href="#seealso">See Also</a>&nbsp; </small></p>
<p>To set the main class and runtime arguments for your JavaFX project</p>
<ol>
  <li>Right-click the JavaFX project node in the Projects window and choose  Properties.<br>
    Alternatively, you can select the project in the Projects window and select File &gt;  Project Properties (<i>JavaFX_project_name</i>) from the main menu. </li>
  <li>Select the  Run node in the Categories pane of the dialog box.</li>
  <li>Type the fully qualified name of the main class in the Main Class field
  	 (for example, <tt>org.myCompany.myLib.MyLibClass</tt>). The main class must
  	  exist in the project or in one of the JAR files or libraries on the project's
  	  runtime classpath. </li>
	  <ul class="note">
    <li> If you use the Browse button to choose the project main class, the file
    	 chooser only displays classes in your project source directory. If you
    	want to specify a class in one the libraries on the classpath, you have
    	to type the fully-qualified name of the class in the Main Class field.</li>
  </ul>

  <li>Select the Application Execution Model of your choice.
  <ul>
  <li><b>Standard Execution.</b> The IDE executes the project as a standalone application. </li>
  <li><b>WebStart Execution.</b> The project is executed  using Java Web Start. </li>
  <li><b>Run in Browser. </b>The IDE enables the application to run in  a web browser. </li>
  <li><b>Run in Mobile Emulator.</b> The project is executed using the mobile emulator, which is included with the JavaFX SDK. Specify a  device for mobile execution by selecting it from the Device combo box. The device can be either an emulator or a real device connected to the computer.</li>
  </ul>
  </li>
  <li>For the Standard execution model, provide any user arguments of the application 
  you require in the Arguments field.</li>
  <li>Enter any  runtime arguments you require in the JVM Arguments field.
    <p>The
  IDE sets the project's main class and stores any newly-added arguments.  </li>
</ol>

<ul class="note">
        <li>For JavaFX projects that have a main class  specified, the IDE automatically copies any JAR 
        files on the project's classpath to the <tt>dist/lib</tt> folder.
        The IDE also adds each of the JAR files 
        to the Class-Path element in the application JAR's <tt>manifest.mf</tt> 
        file. This simplifies running the application outside the IDE. </li>
        </ul>  

<dl>
    <dt><a name="seealso">See Also</a></dt>
    <dd><a href="javafx_run_app.html">Running a JavaFX Application</a></dd>
</dl>


<hr><small><a href="../credits.html">Legal Notices</a></small>

<table border="0" cellpadding="20">
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
</table></body>
</html>
